<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Step 4: Registering the Database of a PostgreSQL Cluster Instance">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="en-us_topic_0000001792402592.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
  <meta name="DC.Publisher" content="20240608">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="EN-US_TOPIC_0000001792562372">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Step 4: Registering the Database of a PostgreSQL Cluster Instance</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="EN-US_TOPIC_0000001792562372"></a><a name="EN-US_TOPIC_0000001792562372"></a>
  <h1 class="topictitle1">Step 4: Registering the Database of a PostgreSQL Cluster Instance</h1>
  <div>
   <div class="section">
    <h4 class="sectiontitle">Prerequisites</h4>
    <ul>
     <li>Before registering a PostgreSQL cluster instance, ensure that each host in the cluster has been registered.
      <div class="note">
       <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
       <div class="notebody">
        <p>All hosts in the cluster must have registered with the same database.</p>
       </div>
      </div> <p>For details, see <a href="en-us_topic_0000001792562448.html">Step 3: Registering the Database of a Single PostgreSQL Instance</a>.</p></li>
     <li>Before registering an instance, check whether the owner of the <strong>bin/lib/share</strong> file in the database installation path is <strong>root</strong>. If the owner is <strong>root</strong>, set <strong>enable_root</strong> to <strong>1</strong> in the <strong>/opt/DataBackup/ProtectClient/Plugins/GeneralDBPlugin/bin/applications/postgresql/conf/switch.conf</strong> configuration file.</li>
     <li>Before registering a PostgreSQL cluster, query the cluster type.<p><strong>Pgpool cluster</strong></p>
      <ol>
       <li>Use PuTTY to log in to the PostgreSQL database host.</li>
       <li>Run the <strong>which pgpool</strong> command to check whether the cluster is a Pgpool cluster.
        <ul>
         <li>If the command output is the path of the Pgpool cluster, the cluster type is Pgpool. No further action is required.</li>
         <li>If <strong>no pgpool</strong> is displayed in the command output, no Pgpool cluster is found. Go to the next step.</li>
        </ul></li>
       <li>Run the <strong>whereis pgpool</strong> command to check whether the cluster is a Pgpool cluster.
        <ul>
         <li>If the command output is the path of the Pgpool cluster, the cluster type is Pgpool. No further action is required.</li>
         <li>If <strong>pgpool:</strong> is displayed in the command output, the current cluster type is not Pgpool.</li>
        </ul></li>
      </ol> <p><strong>Patroni cluster</strong></p>
      <ol>
       <li>Use PuTTY to log in to the PostgreSQL database host.</li>
       <li>Run the <strong>which patroni</strong> command to check whether the cluster is a Patroni cluster.
        <ul>
         <li>If the command output is the path of the Patroni cluster, the cluster type is Patroni. No further action is required.</li>
         <li>If <strong>no patroni</strong> is displayed in the command output, no Patroni cluster is found. Go to the next step.</li>
        </ul></li>
       <li>Run the <strong>whereis patroni</strong> command to check whether the cluster is a Patroni cluster.
        <ul>
         <li>If the command output is the path of the Patroni cluster, the cluster type is Patroni. No further action is required.</li>
         <li>If <strong>patroni:</strong> is displayed in the command output, the current cluster type is not Patroni.</li>
        </ul></li>
      </ol></li>
    </ul>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Procedure</h4>
    <ol>
     <li><span>Create a cluster.</span><p></p>
      <ol type="a">
       <li>On the PostgreSQL page, click the <span class="uicontrol"><b>Cluster</b></span> tab.</li>
       <li>Click <span class="uicontrol"><b>Register</b></span>.</li>
       <li>On the <span class="uicontrol"><b>Registration</b></span> page, customize the cluster name and virtual IP address, and select the type and cluster node.</li>
       <li>Click <span class="uicontrol"><b>OK</b></span>.</li>
      </ol> <p></p></li>
     <li><span>Register the database of a cluster instance.</span><p></p>
      <ol type="a">
       <li>On the PostgreSQL page, click the <span class="uicontrol"><b>Instance</b></span> tab.</li>
       <li>Click <span class="uicontrol"><b>Register</b></span>.</li>
       <li>Set <span class="uicontrol"><b><span><strong>Type</strong></span></b></span> to <span class="uicontrol"><b><span><strong>Cluster instance</strong></span></b></span>.</li>
       <li>Configure the database instance and its authentication information.<p><a href="#EN-US_TOPIC_0000001792562372__table12398130131217">Table 1</a> describes the related parameters.</p>
        <div class="tablenoborder">
         <a name="EN-US_TOPIC_0000001792562372__table12398130131217"></a><a name="table12398130131217"></a>
         <table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001792562372__table12398130131217" frame="border" border="1" rules="all">
          <caption>
           <b>Table 1 </b>PostgreSQL cluster instance registration information
          </caption>
          <colgroup>
           <col style="width:28.050000000000004%">
           <col style="width:71.95%">
          </colgroup>
          <thead align="left">
           <tr>
            <th align="left" class="cellrowborder" valign="top" width="28.050000000000004%" id="mcps1.3.2.2.2.2.1.4.2.2.3.1.1"><p>Parameter</p></th>
            <th align="left" class="cellrowborder" valign="top" width="71.95%" id="mcps1.3.2.2.2.2.1.4.2.2.3.1.2"><p>Description</p></th>
           </tr>
          </thead>
          <tbody>
           <tr>
            <td class="cellrowborder" valign="top" width="28.050000000000004%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.1 "><p><span><strong>Name</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="71.95%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.2 "><p>Username for installing the database.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="28.050000000000004%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.1 "><p><span><strong>Cluster</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="71.95%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.2 "><p>Select the database host to be registered.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="28.050000000000004%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.1 "><p><span><strong>Username</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="71.95%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.2 "><p>OS username of the database.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="28.050000000000004%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.1 "><p><span><strong>Pgpool Port</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="71.95%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.2 "><p>This parameter is not displayed when the database host of the Patroni cluster is selected.</p> <p>Port number used by the Pgpool service to listen on TCP/IP connections.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="28.050000000000004%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.1 "><p><span><strong>Database Username</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="71.95%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.2 "><p>Name of the database administrator.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="28.050000000000004%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.1 "><p><span><strong>Database Password</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="71.95%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.2 "><p>Password of the database administrator.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="28.050000000000004%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.1 "><p><span><strong>Database Stream Replication Username</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="71.95%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.2 "><p>Username for stream replication in the database.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="28.050000000000004%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.1 "><p><span><strong>Database Stream Replication Password</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="71.95%" headers="mcps1.3.2.2.2.2.1.4.2.2.3.1.2 "><p>Password for stream replication in the database.</p></td>
           </tr>
          </tbody>
         </table>
        </div></li>
       <li>Click <strong>Add</strong>. In the displayed <strong>Add</strong> dialog box, add all nodes of the cluster instance.<p><a href="#EN-US_TOPIC_0000001792562372__en-us_topic_0000001311214069_table241515964115">Table 2</a> describes the related parameters.</p>
        <div class="tablenoborder">
         <a name="EN-US_TOPIC_0000001792562372__en-us_topic_0000001311214069_table241515964115"></a><a name="en-us_topic_0000001311214069_table241515964115"></a>
         <table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001792562372__en-us_topic_0000001311214069_table241515964115" frame="border" border="1" rules="all">
          <caption>
           <b>Table 2 </b>Node information of a cluster instance
          </caption>
          <colgroup>
           <col style="width:25.629999999999995%">
           <col style="width:74.37%">
          </colgroup>
          <thead align="left">
           <tr>
            <th align="left" class="cellrowborder" valign="top" width="25.629999999999995%" id="mcps1.3.2.2.2.2.1.5.4.2.3.1.1"><p>Parameter</p></th>
            <th align="left" class="cellrowborder" valign="top" width="74.37%" id="mcps1.3.2.2.2.2.1.5.4.2.3.1.2"><p>Description</p></th>
           </tr>
          </thead>
          <tbody>
           <tr>
            <td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.1 "><p><span><strong>Hosts</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.2 "><p>Host node in the cluster.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.1 "><p><span><strong>Database Installation Path</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.2 "><p>Path for installing the database to be registered.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.1 "><p><strong>Full Path of Patroni Configuration File</strong></p>
             <div class="note">
              <span class="notetitle"> NOTE: </span>
              <div class="notebody">
               <p>This parameter is displayed only in 1.6.0 and later versions.</p>
              </div>
             </div></td>
            <td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.2 "><p>When configuring a cluster instance, set the cluster to the database host of the Patroni cluster. This parameter is displayed when you add a cluster instance node.</p> <p>Full path of the Patroni configuration file.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.1 "><p><span><strong>Pgpool Installation Path</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.2 "><p>Installation path of the Pgpool service.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.1 "><p><span><strong>Service Plane IP Address</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.2 "><p>IP address of the host for the database service to receive TCP/IP connections.</p></td>
           </tr>
           <tr>
            <td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.1 "><p><span><strong>Database Port</strong></span></p></td>
            <td class="cellrowborder" valign="top" width="74.37%" headers="mcps1.3.2.2.2.2.1.5.4.2.3.1.2 "><p>Port number used by the database service to listen on TCP/IP connections.</p></td>
           </tr>
          </tbody>
         </table>
        </div></li>
       <li>Select the registered instance name of each cluster member in sequence.</li>
       <li>Click <span class="uicontrol"><b>OK</b></span>.</li>
      </ol> <p></p></li>
    </ol>
   </div>
   <p></p>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="en-us_topic_0000001792402592.html">Backing Up PostgreSQL</a>
    </div>
   </div>
  </div>
 </body>
</html>